﻿using Core.Common.DomainModel.Interfaces.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using UI.ViewModel;

namespace Main.Web.Controllers
{
    public class UsersController : Controller
    {
        private readonly IUserService _iuserService;
        public UsersController(IUserService iUserService)
        {
            _iuserService = iUserService;
        }

        public ActionResult Index()
        { 

            UsersViewModel viewModel = new UsersViewModel();
            viewModel.UsersList = _iuserService.GetAll();

            return View(viewModel);
        }
    }
}